package com.glsc.ngateway.common.base.domain.mysql.gateway.platform.flow;

import com.glsc.ngateway.common.base.domain.mysql.gateway.FlowFormBaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
import org.hibernate.annotations.SQLDelete;
import org.hibernate.annotations.SQLDeleteAll;
import org.hibernate.annotations.Where;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;


/**
 * @author xuchang
 */
@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@Entity
@Where(clause = "deleted = 0")
@SQLDelete(sql = "update t_gw_flow_form_system_name_apply set deleted = UNIX_TIMESTAMP(NOW()) where id=?")
@SQLDeleteAll(sql = "update t_gw_flow_form_system_name_apply set deleted = UNIX_TIMESTAMP(NOW()) where id=?")
@Table(name = "t_gw_flow_form_system_name_apply")
@org.hibernate.annotations.Table(appliesTo = "t_gw_flow_form_system_name_apply", comment = "系统名称申请流程form表单")
public class FlowFormSystemNameApply extends FlowFormBaseEntity {

    private static final long serialVersionUID = -7719147796229211320L;

    //业务数据

    @Column(name = "system_class_no", columnDefinition = "varchar(10) comment '系统编号'")
    private String systemClassNo;

    @Column(name = "op_name", columnDefinition = "varchar(64) comment '系统名称'")
    private String opName;

    @Column(name = "op_build", columnDefinition = "varchar(10) comment '建设方式'")
    private String opBuild;

    @Column(name = "main_class", columnDefinition = "varchar(10) comment '系统大类'")
    private String mainClass;

    @Column(name = "system_class", columnDefinition = "varchar(10) comment '系统类别'")
    private String systemClass;

    @Column(name = "business_department_arr", columnDefinition = "varchar(256) comment '多个业务对口部门'")
    private String businessDepartmentArr;

    @Column(name = "belong_dept_id", columnDefinition = "varchar(20) comment '单个归口部门id'")
    private String belongDeptId;

    @Column(name = "op_group_id_arr", columnDefinition = "varchar(256) comment '多个团队id'")
    private String opGroupIdArr;

    @Column(name = "system_importance", columnDefinition = "varchar(30) comment '重要性'")
    private String systemImportance;

    @Column(name = "member_manager_arr", columnDefinition = "varchar(256) comment '多个项目经理oa'")
    private String memberManagerArr;

    @Column(name = "system_manager_arr", columnDefinition = "varchar(256) comment '多个系统管理员oa'")
    private String systemManagerArr;

    @Column(name = "ops_manager_arr", columnDefinition = "varchar(256) comment '多个运维管理员oa'")
    private String opsManagerArr;

    @Column(name = "op_support", columnDefinition = "int comment '供应商id'")
    private Integer opSupport;

    @Column(name = "system_summary", columnDefinition = "text comment '系统功能描述'")
    private String systemSummary;

    @Column(name = "appendices_file_id_list", columnDefinition = "Text comment '附件'")
    private String appendicesFileIdList;

}
